import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/application/get_device_info_entity.dart';
import 'dart:ffi';


GetDeviceInfoEntity $GetDeviceInfoEntityFromJson(Map<String, dynamic> json) {
  final GetDeviceInfoEntity getDeviceInfoEntity = GetDeviceInfoEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    getDeviceInfoEntity.id = id;
  }
  final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
  if (deviceName != null) {
    getDeviceInfoEntity.deviceName = deviceName;
  }
  final String? systemName = jsonConvert.convert<String>(json['systemName']);
  if (systemName != null) {
    getDeviceInfoEntity.systemName = systemName;
  }
  final String? deviceCode = jsonConvert.convert<String>(json['deviceCode']);
  if (deviceCode != null) {
    getDeviceInfoEntity.deviceCode = deviceCode;
  }
  final int? deviceLevel = jsonConvert.convert<int>(json['deviceLevel']);
  if (deviceLevel != null) {
    getDeviceInfoEntity.deviceLevel = deviceLevel;
  }
  final String? deviceLevelName = jsonConvert.convert<String>(json['deviceLevelName']);
  if (deviceLevelName != null) {
    getDeviceInfoEntity.deviceLevelName = deviceLevelName;
  }
  final String? videoStream = jsonConvert.convert<String>(json['videoStream']);
  if (videoStream != null) {
    getDeviceInfoEntity.videoStream = videoStream;
  }
  final int? isUse = jsonConvert.convert<int>(json['isUse']);
  if (isUse != null) {
    getDeviceInfoEntity.isUse = isUse;
  }
  final double? longitude = jsonConvert.convert<double>(json['longitude']);
  if (longitude != null) {
    getDeviceInfoEntity.longitude = longitude;
  }
  final double? latitude = jsonConvert.convert<double>(json['latitude']);
  if (latitude != null) {
    getDeviceInfoEntity.latitude = latitude;
  }
  final double? altitude = jsonConvert.convert<double>(json['altitude']);
  if (altitude != null) {
    getDeviceInfoEntity.altitude = altitude;
  }
  final String? deviceAddr = jsonConvert.convert<String>(json['deviceAddr']);
  if (deviceAddr != null) {
    getDeviceInfoEntity.deviceAddr = deviceAddr;
  }
  final String? deviceTypeName = jsonConvert.convert<String>(json['deviceTypeName']);
  if (deviceTypeName != null) {
    getDeviceInfoEntity.deviceTypeName = deviceTypeName;
  }
  final int? deviceTypeId = jsonConvert.convert<int>(json['deviceTypeId']);
  if (deviceTypeId != null) {
    getDeviceInfoEntity.deviceTypeId = deviceTypeId;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    getDeviceInfoEntity.companyId = companyId;
  }
  final String? companyName = jsonConvert.convert<String>(json['companyName']);
  if (companyName != null) {
    getDeviceInfoEntity.companyName = companyName;
  }
  final String? manufacturer = jsonConvert.convert<String>(json['manufacturer']);
  if (manufacturer != null) {
    getDeviceInfoEntity.manufacturer = manufacturer;
  }
  final String? brand = jsonConvert.convert<String>(json['brand']);
  if (brand != null) {
    getDeviceInfoEntity.brand = brand;
  }
  final String? installTime = jsonConvert.convert<String>(json['installTime']);
  if (installTime != null) {
    getDeviceInfoEntity.installTime = installTime;
  }
  final int? deviceStatus = jsonConvert.convert<int>(json['deviceStatus']);
  if (deviceStatus != null) {
    getDeviceInfoEntity.deviceStatus = deviceStatus;
  }
  final String? deviceDesc = jsonConvert.convert<String>(json['deviceDesc']);
  if (deviceDesc != null) {
    getDeviceInfoEntity.deviceDesc = deviceDesc;
  }
  final int? useType = jsonConvert.convert<int>(json['useType']);
  if (useType != null) {
    getDeviceInfoEntity.useType = useType;
  }
  final int? createTime = jsonConvert.convert<int>(json['createTime']);
  if (createTime != null) {
    getDeviceInfoEntity.createTime = createTime;
  }
  final String? outNetAddress = jsonConvert.convert<String>(json['outNetAddress']);
  if (outNetAddress != null) {
    getDeviceInfoEntity.outNetAddress = outNetAddress;
  }
  return getDeviceInfoEntity;
}

Map<String, dynamic> $GetDeviceInfoEntityToJson(GetDeviceInfoEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['deviceName'] = entity.deviceName;
  data['systemName'] = entity.systemName;
  data['deviceCode'] = entity.deviceCode;
  data['deviceLevel'] = entity.deviceLevel;
  data['deviceLevelName'] = entity.deviceLevelName;
  data['videoStream'] = entity.videoStream;
  data['isUse'] = entity.isUse;
  data['longitude'] = entity.longitude;
  data['latitude'] = entity.latitude;
  data['altitude'] = entity.altitude;
  data['deviceAddr'] = entity.deviceAddr;
  data['deviceTypeName'] = entity.deviceTypeName;
  data['deviceTypeId'] = entity.deviceTypeId;
  data['companyId'] = entity.companyId;
  data['companyName'] = entity.companyName;
  data['manufacturer'] = entity.manufacturer;
  data['brand'] = entity.brand;
  data['installTime'] = entity.installTime;
  data['deviceStatus'] = entity.deviceStatus;
  data['deviceDesc'] = entity.deviceDesc;
  data['useType'] = entity.useType;
  data['createTime'] = entity.createTime;
  data['outNetAddress'] = entity.outNetAddress;
  return data;
}

extension GetDeviceInfoEntityExtension on GetDeviceInfoEntity {
  GetDeviceInfoEntity copyWith({
    int? id,
    String? deviceName,
    String? systemName,
    String? deviceCode,
    int? deviceLevel,
    String? deviceLevelName,
    String? videoStream,
    int? isUse,
    double? longitude,
    double? latitude,
    double? altitude,
    String? deviceAddr,
    String? deviceTypeName,
    int? deviceTypeId,
    int? companyId,
    String? companyName,
    String? manufacturer,
    String? brand,
    String? installTime,
    int? deviceStatus,
    String? deviceDesc,
    int? useType,
    int? createTime,
    String? outNetAddress,
  }) {
    return GetDeviceInfoEntity()
      ..id = id ?? this.id
      ..deviceName = deviceName ?? this.deviceName
      ..systemName = systemName ?? this.systemName
      ..deviceCode = deviceCode ?? this.deviceCode
      ..deviceLevel = deviceLevel ?? this.deviceLevel
      ..deviceLevelName = deviceLevelName ?? this.deviceLevelName
      ..videoStream = videoStream ?? this.videoStream
      ..isUse = isUse ?? this.isUse
      ..longitude = longitude ?? this.longitude
      ..latitude = latitude ?? this.latitude
      ..altitude = altitude ?? this.altitude
      ..deviceAddr = deviceAddr ?? this.deviceAddr
      ..deviceTypeName = deviceTypeName ?? this.deviceTypeName
      ..deviceTypeId = deviceTypeId ?? this.deviceTypeId
      ..companyId = companyId ?? this.companyId
      ..companyName = companyName ?? this.companyName
      ..manufacturer = manufacturer ?? this.manufacturer
      ..brand = brand ?? this.brand
      ..installTime = installTime ?? this.installTime
      ..deviceStatus = deviceStatus ?? this.deviceStatus
      ..deviceDesc = deviceDesc ?? this.deviceDesc
      ..useType = useType ?? this.useType
      ..createTime = createTime ?? this.createTime
      ..outNetAddress = outNetAddress ?? this.outNetAddress;
  }
}